home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
bbsutil
/
bbsamt40.zip
/
BANSI001.DOC
< prev
next >
Wrap
Text File
|
1994-04-18
|
23KB
|
626 lines
copyright (c) 1994 by Paul Wheaton, Banana Programming
The ANSI-BBS industry is riddled with conflicts. Since the true ANSI
standard has not been strictly followed, a variety of variations have
evolved. Some have become popular.
This document spells out what BananaCom uses for it's terminal emulation: A
mish-mash of ANSI, VT100, pseudo-ANSI and pseudo-VT100 that tries to follow
what most modem services expect and use. Perhaps this will help to make
BBS's and COM programs work together with a little less research and
programming effort.
Terminal sends:
All ASCII characters from 1 to 127 are sent as is. If somebody wants to
feed a special character that comes through as a character 128 through
255, send that through too.
Note that "Doorway mode" is a simple, beautiful thing developed by
Marshall Dudley that allows a user calling a modem service to run DOS
programs on the modem service! Look for DRWY*.* on your favorite modem
service or call Marshall Dudley's support BBS at (615)675-3282. While
BananaCom is in Doorway Mode, all IBM PC extended keys send a NULL
character (ASCII value 0) followed by the scan code given by the BIOS.
ANSI terminal emulation is supposed to be a superset of the escape
sequences used by the DEC VT100 terminal. These required that an escape
(ASCII 27) be sent followed by some other characters. The following
keystrokes are well established:
Keystroke Sent Doorway mode
left arrow key ESC [ D NULL 75
right arrow key ESC [ C NULL 77
up arrow key ESC [ A NULL 72
down arrow key ESC [ B NULL 80
home key ESC [ H NULL 71
end key ESC [ K NULL 79
^home key ESC [ L NULL 119
^page up ESC [ M NULL 132
F1 key ESC O P NULL 59
F2 key ESC O Q NULL 60
F3 key ESC O w NULL 61
F4 key ESC O x NULL 62
capital "oh", not a zero^ ^ASCII value 0
All other keys send a NULL character (ASCII value 0) and then the BIOS
scan code (as a character, not multi digits representing the number).
Note that most com programs will use Alt-A through Alt-Z and Alt-1
through Alt-9 and Alt-0. If there happens to be keys left they will be
passed through.
Function keys are your best bet and are all passed through
Alone Shift Ctrl Alt
F1 NULL 84 NULL 94 NULL 104
F2 NULL 85 NULL 95 NULL 105
F3 NULL 86 NULL 96 NULL 106
F4 NULL 87 NULL 97 NULL 107
F5 NULL 63 NULL 88 NULL 98 NULL 108
F6 NULL 64 NULL 89 NULL 99 NULL 109
F7 NULL 65 NULL 90 NULL 100 NULL 110
F8 NULL 66 NULL 91 NULL 101 NULL 111
F9 NULL 67 NULL 92 NULL 102 NULL 112
F10 NULL 68 NULL 93 NULL 103 NULL 113
Some com programs use the Page Up and Page Down keys to initiate a file
transfer although this seems to be changing - these keys are of great
use to BBS's.
Page Up NULL 73
Page Down NULL 81
Insert NULL 82
Note that when you press control-page-down with some terminal programs,
they send ESC [ H ESC [ 2 J and a lot of BBS's simply ignore that.
ctrl-page-down NULL 118
ctrl-end NULL 117
ctrl-left-arrow NULL 115
ctrl-right-arrow NULL 116
shift-tab NULL 15
Terminal receives:
Most ANSI terminals use a screen 80x24 - with the last line reserved for
reporting the current status of the terminal program. BananaCom uses
this standard.
There are a few ASCII characters that have a special effect on the
terminal:
Dec Hex char function
7 7 ^G beep
8 8 ^H destructive backspace
9 9 ^I tab - move to next tab column (8,16,24,32,40...)
10 A ^J line feed - move down one. Scroll up if needed
12 C ^L clear screen (normal attribute) & home cursor (1,1)
13 D ^M return - move cursor to column 1
Note that passing through a NULL (ASCII value 0), will force the next
character to be displayed on the screen and not interpretted.
Example:
Sending a ^L that is not preceeded by a NULL character will result in
clearing the screen. Sending a NULL character and then ^L will result
in the female symbol appearing at the current cursor location.
Escape sequences do not have spaces in them. Spaces have been added
here for readability.
Anything appearing in angle brackets is an escape sequnce variable. The
angle brackets are not sent.
ESC D scroll up
~~~~~~~~~~~~~~~~~~
All of the text on the screen (or the scrolling region, if one is
defined) is scrolled up one line. The bottom line is filled with
spaces colored according to the current attribute.
Note that there is no left bracket "[" between the ESC and the 'D'.
Example: ESC D scroll all text up one line
ESC M scroll down
~~~~~~~~~~~~~~~~~~~~
All of the text on the screen (or the scrolling region, if one is
defined) is scrolled down one line. The top line is filled with spaces
colored according to the current attribute.
Note that there is no left bracket "[" between the ESC and the 'M'.
Example: ESC M scroll all text down one line
ESC [ @ insert char
~~~~~~~~~~~~~~~~~~~~~~
Insert a space into the current line at the current cursor position.
The character at column 80 is thrown out. The current attribute is
used for the new space.
ESC [ <NumLines> A cursor up
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Move the cursor up specified number of lines (default is one).
If "ESC [ ? 6 h" has been received since last "ESC [ <var> ; <var> r"
then the cursor will not be allowed to move beyond the top of the
scrolling region.
Example: ESC [ 1 0 A move up ten lines
Example: ESC [ A move up one line
ESC [ <NumLines> B cursor down
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Move the cursor down specified number of lines (default is one).
If "ESC [ ? 6 h" has been received since last "ESC [ <var> ; <var> r"
then the cursor will not be allowed to move beyond the bottom of the
scrolling region.
Example: ESC [ 1 0 B move down ten lines
Example: ESC [ B move down one line
ESC [ <NumCols> C cursor right
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Move the cursor right specified number of lines (default is one).
Example: ESC [ 1 0 C move right ten columns
Example: ESC [ C move right one column
ESC [ <NumCols> D cursor left
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Move the cursor left specified number of lines (default is one). Cannot
move beyond left of screen.
Example: ESC [ 1 0 D move left ten columns
Example: ESC [ D move left one column
ESC [ <Num> E line feed
~~~~~~~~~~~~~~~~~~~~~~~~~~
Convert to specified number of line feeds. If the cursor is at the
bottom of the screen (or scrolling region if one is defined) text will
be scrolled up and the bottom line will be cleared.
Example: ESC [ 1 0 E convert and process as ten linefeeds
Example: ESC [ E convert and process as onr linefeed
(why not just send ^J ?)
ESC [ F undefined
ESC [ G undefined
ESC [ <row> ; <col> H move to
~~~~~~~~~~~~~~~~~